= title(t('sessions.title'))

%section#login
  #registered-users
    #shadow_box_content
      %p
        %b= t('sessions.enter_credentials')
      = form_tag login_url, :id => "new-session-form" do
        %table
          %tbody
            %tr
              %td
                = sprite_tag("help", :alt => "?", :class=> "help", :title => t('sessions.email_help_html'))
                = label_tag :email, t('sessions.email')
              %td
                = email_field_tag :email, @email, :size => 35, :required => "required", :autofocus => "autofocus",
                  :placeholder => t('sessions.email_placeholder')
                .form-field-error
            %tr
              %td
                = sprite_tag("help", :alt => "?", :class=> "help", :title => t('sessions.password_help_html'))
                = label_tag :password, t('sessions.password')
              %td
                = password_field_tag :password, nil, :size => 35, :required => "required",
                  :placeholder => t('sessions.password_placeholder')
                .form-field-error
            %tr
              %td
                = sprite_tag("help", :alt => "?", :class=> "help", :title => t('sessions.provider_help_html'))
                = label_tag :cloud_service, t('sessions.provider')
              %td
                = select_tag :cloud_service, options_for_select(@available_targets, @selected_target),
                  :required => "required", :class => "target-chosen", :style => "width: 300px;"
                .form-field-error
                = hidden_field_tag :target_url
            %tr.args
              %td
                = label_tag :target_args,  t('sessions.target_args')
              %td
                = text_field_tag :target_args, @target_args, :size => 35
                .form-field-error
            %tr
              %td
                = sprite_tag("help", :alt => "?", :class=> "help", :title => t('sessions.remember_help_html'))
                = label_tag :remember_me, t('sessions.remember')
              %td
                = check_box_tag :remember_me, true, @remember_me
            %tr
              %td{:colspan => 2}
                = submit_tag t('sessions.login')
  #new-users
    #shadow_box_content
      %p
        %b= t('sessions.description_html')
      %p
        %b= t('sessions.source_code_html')
      %p
        %b= t('sessions.learn_more_html')